<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta name="csrf_token" id="token" content="{{ csrf_token() }}">
    @include('public.h5_head')
    <title>正在调货</title>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/rem.js"></script>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/css/commoncss/common.css"/>
    <link rel="stylesheet" type="text/css" href="{{ env('CDN_DOMAIN_NAME') }}/store/css/cart.css?v=1.3.0"/>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/app.js"></script>
    <script src="{{ env('CDN_DOMAIN_NAME') }}/js/commonjs/iscroll.js"></script>
    <style media="screen">
      .close-for-goods{
        border:1px solid #000;
        border-radius: 90px;
        background: rgba(0,0,0,0);
        padding:0.2rem 0.555rem;
        outline: none;
        position: absolute;
        z-index: 99999;
        bottom:0.427rem;
        right:4%;
      }
      /*delDiv*/
      .delDiv{width:11.52rem;height:4.48rem;text-align:center;color:#000;background:#F7F7F7;-moz-border-radius:0.555rem;-webkit-border-radius:0.555rem;border-radius:0.555rem;font-size:0.725rem;position: absolute;top:-1.856rem;left:0;right:0;bottom:0;margin:auto;z-index:10000;}
      .delDiv .delDiv_tip{width:100%;height:2.56rem;line-height:2.56rem;border-bottom:1px solid #e2e2e2;}
      .delDiv .delDiv_info{width:100%;height:1.877rem;line-height:1.877rem;}
      .delDiv .delDiv_info .delDiv_info_left{width:50%;height:1.877rem;text-align:center;float:left;border-right:1px solid #e2e2e2;box-sizing:border-box;}
      .delDiv .delDiv_info .delDiv_info_right{width:50%;height:1.877rem;text-align:center;float:right;}
      .delDiv .delDiv_info .btn-green{border:0;font-size:0.725rem;color:#3A79FF;background:none;outline:none;width: 100%;height:1.877rem;}
      /*mask*/
      .mask{width:100%;height:100%;position:absolute;top:0;left:0;z-index:1000;background:#000;opacity:0.4;filter:alpha(opacity=40);}
      .cart_text span{
          float:right;
      }
      /*没有列表*/
      .lis_em{width: 100%;height: 8.918rem;}
        .lis_em .no_em{width: 100%;height: 7.211rem;}
        .lis_em .no_em .no_img{width: 3rem;height: 3rem;margin: 0 auto;padding-top: 4rem;}
        .lis_em .no_em .no_img img{width: 3rem;height: 3rem;}
        .lis_wrods{width: 100%;height: 1.707rem;line-height: 1.707rem;font-size: 0.7rem;color: #a3a3a3;text-align: center;}
    </style>
</head>
<body onload="loaded()">
<div id="box_cart">
    <div class="wrap" id="ch_ad">
        <div class="cart">
        @if(count($infos)>0)
            <ul class="cart_ul" id="cart_ul" >
                @foreach ($infos as $k => $v)
                    <li class="cart_li">
                    <div class="lists">
                    @if($v->type==2)
                    <a href="/customer/customer-prolists?girard={{$v->girard}}&from=transfer">
                    @else
                    <a href="/customer/seeking-edit-goods?girard={{$v->girard}}&from=transfer">
                    @endif
                            <div class="cart_pic">
                                <img src="{{ env('CDN_DOMAIN_NAME').'/upload/' }}{{$v->face}}" alt="" class="cart_img" />
                            </div>
                            <div class="cart_info">
                                <div class="cart_tit">
                                    <p class="cart_text">【{{$v->title}}】</p>
                                </div>
                                <div class="cart_doble">
                                    <p class="cart_size">款号：{{$v->girard}}</p>
                                    {{--@if($v->type==2)--}}
                                        {{--<p class="cart_money"><i>￥</i>{{$v->price}}</p>--}}
                                    {{--@endif--}}
                                </div>
                                <p class="cart_style">颜色：{{$v->colors}}</p>
                                <p class="cart_color">尺码：{{$v->sizes}}
                                </p>
                            </div>
                    </a>
                    <button type="button" abc="{{$v->id}}"  class="close-for-goods">关闭@if($v->type==2)去库存@else求货@endif</button>
                    </div>
                    </li>
                @endforeach
            </ul>
            @else
            <div class="lis_em">
                <div class="no_em">
                    <div class="no_img">
                        <img src="/img/00013.png">
                    </div>
                </div>
                <p class="lis_wrods">没有正在调货的商品</p>
            </div>
            @endif
        </div>
        <div class="delDiv" style="display:none">
            <div class="delDiv_tip">确认关闭？</div>
            <div class="delDiv_info">
                <span id="" class="delDiv_info_left">
                    <button id="btnCancel" class="btn-green btnCancel" type="button" >取消</button>
                </span>
                <span id="" class="delDiv_info_right">
                    <button id="btnDelTrue" class="btn-green btnDelTrue" type="button">确认</button>
                </span>
            </div>
        </div>
        <div class="mask" style="display:none"></div>
        </div>
</div>

</body>
<script>
    var myScroll;
    function loaded () {
        setTimeout(function(){
            myScroll = new IScroll('.wrap', {
                mouseWheel: true,
                click: true
            });
        },100);
    }
    $(document).on('click','.close-for-goods',function() {
      $('.delDiv').show();
      $('.mask').show();
      var orderNum = $(this).attr('abc');
      $('#btnDelTrue').attr('abc',orderNum);
    });
    $('#btnDelTrue').click(function(){
      var orderNum = $(this).attr('abc');
      $.ajax({
        url:"/customer/update-goods-status",
        data:{
            id:orderNum
        },
        headers: {
            'X-CSRF-TOKEN': $('meta[name="csrf_token"]').attr('content')
        },
        type:'POST',
        dataType:'json',
        success:function(data){
            window.location.reload();
        }
    });
        
    });
    $('#btnCancel').click(function(){
      $('.delDiv').hide();
      $('.mask').hide();
    });
</script>
</html>
